global with sharing class TradeIncrementEntry {
	
/*	 global Boolean resetPDA{get;set;}
	
     global List<Account> InsertAccount{get;set;}
     global List<Account> UpdateAccount{get;set;}
     global List<Id> DeleteAccount{get;set;}
     
     global List<Distributor__c> InsertDistributor{get;set;}
     global List<Distributor__c> updateDistributor{get;set;}
     global List<Id> deleteDistributor{get;set;}
     
     global List<Product2> InsertProduct{get;set;}
     global List<Product2> UpdateProduct{get;set;}
     global List<Id> DeleteProduct{get;set;}
     
     global List<Hospital__c> InsertHospital{get;set;}
     global List<Hospital__c> UpdateHospital{get;set;}
     global List<Id> DeteleHospital{get;set;}
     
      global TradeIncrementEntry()
      {
      	resetPDA=false;
      	
      	InsertAccount=new List<Account>();
      	UpdateAccount=new List<Account>();
      	DeleteAccount=new List<Id>();
      	
      	InsertDistributor=new List<Distributor__c>();
      	updateDistributor=new List<Distributor__c>();
      	deleteDistributor=new List<Id>();
      	
      	InsertProduct=new List<Product2>();
      	UpdateProduct=new List<Product2>();
      	DeleteProduct=new List<Id>();
      	
      	InsertHospital=new List<Hospital__c>();
      	UpdateHospital=new List<Hospital__c>();
      	DeteleHospital=new List<Id>();
      	
      }
      
    public static  Map<Id,Account> getAccountMap 
    {
    	get
    	{
    		Map<Id,Account> mapAccount=new Map<Id,Account>([select Id,OutletArea__c,Name,City__c,City__r.Name,Outlet_Code__c,
    		                                                Chain_Customer__c,Outlet_Type__c,ChannelGroup__c,Channel__c,
    		                                                Outlet_Address__c,Contact__c,Nearby_Hospital__c,ContactPhoneNumber__c,
    		                                                Outlet_Area__c,No_of_checkout__c,Around_Hospital_Or_Not__c,
    		                                                Distributor_Name__c,DMC_Chain_Customer__c,With_NC_or_not__c,
    		                                                Active_Status__c,LastModifiedDate,OutletCode__c 
										      				from Account where Active_Status__c='正常营业']);
			return mapAccount;
    	}
    }
    
    public static Map<Id,Distributor__c> getDistributorMap
    {
    	get
    	{
    		 Map<Id,Distributor__c> mapDistributor=new Map<Id,Distributor__c>([Select Distributor_Code__c,Id,LastModifiedDate,Name 
		   																	 from Distributor__c]);
		   	return mapDistributor;
    	}
    }
    
    public static Map<Id,Product2> getProductMap
    {
    	get
    	{
    		 Map<Id,Product2> mapProduct=new Map<Id,Product2>([select ProductCode,Name,Brand__c,Barcode__c,Id,Product_English_Name__c,Brand_Group__c,
    		                                 Product_Stage__c,Product_Type__c,Product_Package__c,Pack_Size_C__c ,Product_Unit_Volume__c,
    		                                 Product_Shipment_Price__c,Distributor_Listing_Price_After_Tax__c,LastModifiedDate 
    		                                 from Product2 where IsActive=true]);
    		return mapProduct;
    	}
    }
    public static Map<Id,Hospital__c> getHospitalMap
    {
    	get
    	{
    		Map<Id,Hospital__c> mapHospital=new Map<Id,Hospital__c>([Select HospitalCode__c,Id,Name from Hospital__c where Active__c=true]);
    		
    		return mapHospital;
    	}
    }
    
    public Map<Id,PDAMasterDataBackup__c> GetBackUpDataList
    {
    	get
    	{
    		Map<Id,PDAMasterDataBackup__c> BackupDataList=new Map<Id,PDAMasterDataBackup__c>([select Id,Type__c,createdDate from PDAMasterDataBackup__c]);
    		return BackupDataList;
    	}
    }
    
     //创建新的数据到备份表并且删除原先的数据
    @Future(callout=true)
    public static void CreateAndDeleteBackUPPDAData()
    {
    	List<PDAMasterDataBackup__c> BackDataList=new List<PDAMasterDataBackup__c>();
    	
    	for(Account acc:getAccountMap.values())
    	{
    		BackDataList.add(new PDAMasterDataBackup__c(ID__c=acc.Id,Type__c='Outlet'));
    	}
    	
    	for(Distributor__c dis:getDistributorMap.values())
    	{
    		BackDataList.add(new PDAMasterDataBackup__c(ID__c=dis.Id,Type__c='Distributor'));
    	}
    	
    	for(Product2 pro:getProductMap.values())
    	{
    		BackDataList.add(new PDAMasterDataBackup__c(ID__c=pro.Id,Type__c='Product'));
    	}
    	
    	for(Hospital__c hos:getHospitalMap.values())
    	{
    		BackDataList.add(new PDAMasterDataBackup__c(ID__c=hos.Id,Type__c='Hospital_T'));
    	}
    	
    	delete [select Id from PDAMasterDataBackup__c];
    	insert BackDataList;
    }*/
}